<?php
// get the class
require_once('../../plainTemplates/plainTemplates.php');
// always end dir with a slash
plainTemplates::$cacheDir = '../../plainTemplates/cache/';
plainTemplates::clearCache();
//plainTemplates::$debug = true;
$data = array(
	array(
		'Post' => array(
			'title' => 'Im the title',
			'body' => 'Im the body',
		),
		'Comment' => array(
			array(
				'author' => 'Im the 1st comment of 1st post',
				'body' => "This field has same name as post's one",
			),
			array(
				'author' => 'Im the 2nd comment of 1st post',
				'body' => 'So am i',
			),
		),
	),
	array(
		'Post' => array(
			'title' => 'Im the post without comments',
			'body' => 'His right',
		),
		'Comment' => array(),
	),
);
// include to fully preserve scope
include(
	// default's can save you a looot of time
	// convention over configuration
	plainTemplates::createTemplate('template.htm', array('$data', $data))
);
?>